package com.itheima.health.service;

import com.itheima.health.entity.Result;
import io.swagger.annotations.Api;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "报表模块管理")
public class ReportController {
    @Reference
    private ReportService reportService;


    @GetMapping("report/getMemberCount")
    public Result getMemberCount(){
        Map map =  reportService.findMemberCountByMonth();
        return new Result(map);
    }


    //report/findSetmealProportion
    @GetMapping("report/findSetmealProportion")
    public Result findSetmealProportion(){
        List<Map> mapList =  reportService.findsetmealProportion();
        return new Result(mapList);
    }

}
